package com.fable.sp.core.domain;

import com.fable.sp.core.enums.ContainerType;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Map;

/**
 * .
 *
 * @author stormning on 16/7/30.
 */
@Entity
@Table(name = "sp_container")
public class Container extends BaseEntity {

    @Column(name = "container_type")
    private ContainerType containerType = ContainerType.FORM;

    @Column(name = "name")
    private String name;

    @Column(name = "info")
    private String info;

    @Column(name = "pid")
    private Long pid;

    @Column(name = "path")
    private String path;

    @Transient
    private Map<Long, Object> instanceColumnValues;
    @Transient
    private Map<String, Object> columnValues;
    @Transient
    private Layout currentLayout;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public ContainerType getContainerType() {
        return containerType;
    }

    public void setContainerType(ContainerType containerType) {
        this.containerType = containerType;
    }

    public Map<Long, Object> getInstanceColumnValues() {
        return instanceColumnValues;
    }

    public void setInstanceColumnValues(Map<Long, Object> instanceColumnValues) {
        this.instanceColumnValues = instanceColumnValues;
    }

    public void setColumnValues(Map<String, Object> columnValues) {
        this.columnValues = columnValues;
    }

    public Map<String, Object> getColumnValues() {
        return columnValues;
    }

    public Layout getCurrentLayout() {
        return currentLayout;
    }

    public void setCurrentLayout(Layout currentLayout) {
        this.currentLayout = currentLayout;
    }
}
